package com.cn.kehong.dao;

import com.cn.kehong.domain.Energy;
import com.cn.kehong.domain.EnergyExample;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

import com.cn.kehong.utils.QueryForm;
import org.apache.ibatis.annotations.Param;

public interface EnergyMapper {
    int countByExample(EnergyExample example);

    int deleteByExample(EnergyExample example);

    int deleteByPrimaryKey(String id);

    int insert(Energy record);

    int insertSelective(Energy record);

    List<Energy> selectByExample(EnergyExample example);

    Energy selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Energy record, @Param("example") EnergyExample example);

    int updateByExample(@Param("record") Energy record, @Param("example") EnergyExample example);

    int updateByPrimaryKeySelective(Energy record);

    int updateByPrimaryKey(Energy record);

    List<Energy> getWorkshop();

    List<Energy> selectByCreateTime(@Param("workshop")String workshop, @Param("energyType")String energyType);

    List<Energy> getEnergyType();

    List<Energy> selectByTypeAndi(@Param("energyType") String energyType,@Param("currentYear") String currentYear,@Param("i") Integer i);

    BigDecimal getLastYear(@Param("workshop") String workshop, @Param("energyType") String energyType, @Param("lastYear") String lastYear);

    BigDecimal getCurrentYear(@Param("workshop") String workshop, @Param("energyType") String energyType, @Param("currentYear") String currentYear);


    BigDecimal getCurrentMonth(@Param("workshop") String workshop, @Param("energyType") String energyType, @Param("currentMonth") String currentMonth);

    List<Energy> getYestoday(@Param("workshop")String workshop, @Param("energyType")String energyType, @Param("currentYear")String currentYear, @Param("currentMonth")String currentMonth, @Param("yesterdayDay")String yesterdayDay);

    List<Energy> selectEnergyData(@Param("list")List<String> list, @Param("workshop")String workshop, @Param("startTime")String startTime, @Param("endTime")String endTime);

    List<Energy> getToday(@Param("workshop")String workshop, @Param("energyType")String energyType, @Param("currentYear")String currentYear, @Param("currentMonth")String currentMonth, @Param("today") String today);

    List<Energy> getElectricityType(String s);

    List<Energy> getDataList(QueryForm queryForm);

    void batchInsert(@Param("list")List<Energy> energyList);
}